﻿using System;
using Volo.Abp.MultiTenancy;

namespace Xms.Abp.Authorization;

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Field, AllowMultiple = false)]
public class PermissionItemAttribute : Attribute
{
    public string CustomName { get; set; }

    public bool IsEnabled { get; set; }

    public MultiTenancySides MultiTenancySides { get; set; }

    public PermissionItemAttribute(string customName = null, MultiTenancySides multiTenancySides = MultiTenancySides.Both, bool isEnabled = true)
    {
        CustomName = customName;
        MultiTenancySides = multiTenancySides;
        IsEnabled = isEnabled;
    }
}
